import java.math.BigInteger;

/**
 * Created with IntelliJ IDEA.
 * Description: 小蓝与钥匙
 * User: DELL
 * Date: 2024-05-24
 * Time: 9:02
 */
public class Main1 {
    static long[][] C;
    static long[] F;

    public static void main(String[] args) {
        C = new long[29][29];
        F = new long[15];
        initC();
        F[0] = 1;
        F[1] = 0;
        F[2] = 1;
        for (int i = 3; i <= 14; i++) {
            F[i] = fun(i);
            for (int j = 1; j <= i; j++) {
                F[i] -= C[i][j] * F[i - j];
            }
        }
        BigInteger bigInteger1 = new BigInteger(String.valueOf(F[14]));
        BigInteger bigInteger2 = new BigInteger(String.valueOf(C[28][14]));
        System.out.println(bigInteger1.multiply(bigInteger2));
    }

    static void initC() {
        for (int i = 0; i <= 28; i++) {
            C[i][0] = 1;
        }
        C[1][1] = 1;
        for (int i = 2; i <= 28; i++) {
            for (int j = 1; j <= i; j++) {
                C[i][j] = C[i - 1][j] + C[i - 1][j - 1];
            }
        }
    }

    /**
     * 求阶乘
     *
     * @return
     */
    static long fun(int n) {
        long res = 1;
        for (int i = 1; i <= n; i++) {
            res *= i;
        }
        return res;
    }
}
